package c.e.a.b.f.b;

import android.net.Uri;

/* compiled from: com.google.android.gms:play-services-measurement-impl@@18.0.0 */
public final class c7 implements Runnable {
    public final /* synthetic */ boolean a;
    public final /* synthetic */ Uri b;
    public final /* synthetic */ String c;
    public final /* synthetic */ String d;
    public final /* synthetic */ y6 e;

    public c7(y6 y6Var, boolean z, Uri uri, String str, String str2) {
        this.e = y6Var;
        this.a = z;
        this.b = uri;
        this.c = str;
        this.d = str2;
    }

    /* JADX WARNING: Removed duplicated region for block: B:89:0x01c3 A:{Catch:{ Exception -> 0x01cf }} */
    /* JADX WARNING: Removed duplicated region for block: B:88:0x01b7 A:{Catch:{ Exception -> 0x01cf }} */
    /* JADX WARNING: Removed duplicated region for block: B:46:0x00fb A:{Catch:{ Exception -> 0x01cf }} */
    /* JADX WARNING: Removed duplicated region for block: B:32:0x00a0 A:{SYNTHETIC, Splitter:B:32:0x00a0} */
    /* JADX WARNING: Removed duplicated region for block: B:50:0x010c A:{SYNTHETIC, Splitter:B:50:0x010c} */
    /* JADX WARNING: Removed duplicated region for block: B:63:0x013d A:{Catch:{ Exception -> 0x01cf }} */
    /* JADX WARNING: Removed duplicated region for block: B:62:0x013b A:{Catch:{ Exception -> 0x01cf }} */
    /* JADX WARNING: Missing block: B:9:0x0045, code skipped:
            if (r2.a.a.g.o(c.e.a.b.f.b.p.f0) == false) goto L_0x0075;
     */
    public final void run() {
        /*
        r18 = this;
        r1 = r18;
        r2 = r1.e;
        r0 = r1.a;
        r3 = r1.b;
        r4 = r1.c;
        r5 = r1.d;
        r6 = r2.a;
        r6.g();
        r6 = r2.a;	 Catch:{ Exception -> 0x01cf }
        r6 = r6.a;	 Catch:{ Exception -> 0x01cf }
        r6 = r6.g;	 Catch:{ Exception -> 0x01cf }
        r7 = c.e.a.b.f.b.p.e0;	 Catch:{ Exception -> 0x01cf }
        r6 = r6.o(r7);	 Catch:{ Exception -> 0x01cf }
        r7 = "Activity created with data 'referrer' without required params";
        r8 = "utm_medium";
        r9 = "_cis";
        r10 = "utm_source";
        r11 = "utm_campaign";
        r12 = "gclid";
        if (r6 != 0) goto L_0x0047;
    L_0x002b:
        r6 = r2.a;	 Catch:{ Exception -> 0x01cf }
        r6 = r6.a;	 Catch:{ Exception -> 0x01cf }
        r6 = r6.g;	 Catch:{ Exception -> 0x01cf }
        r14 = c.e.a.b.f.b.p.g0;	 Catch:{ Exception -> 0x01cf }
        r6 = r6.o(r14);	 Catch:{ Exception -> 0x01cf }
        if (r6 != 0) goto L_0x0047;
    L_0x0039:
        r6 = r2.a;	 Catch:{ Exception -> 0x01cf }
        r6 = r6.a;	 Catch:{ Exception -> 0x01cf }
        r6 = r6.g;	 Catch:{ Exception -> 0x01cf }
        r14 = c.e.a.b.f.b.p.f0;	 Catch:{ Exception -> 0x01cf }
        r6 = r6.o(r14);	 Catch:{ Exception -> 0x01cf }
        if (r6 == 0) goto L_0x0075;
    L_0x0047:
        r6 = r2.a;	 Catch:{ Exception -> 0x01cf }
        r6 = r6.k();	 Catch:{ Exception -> 0x01cf }
        r14 = android.text.TextUtils.isEmpty(r5);	 Catch:{ Exception -> 0x01cf }
        if (r14 == 0) goto L_0x0054;
    L_0x0053:
        goto L_0x0075;
    L_0x0054:
        r14 = r5.contains(r12);	 Catch:{ Exception -> 0x01cf }
        if (r14 != 0) goto L_0x0077;
    L_0x005a:
        r14 = r5.contains(r11);	 Catch:{ Exception -> 0x01cf }
        if (r14 != 0) goto L_0x0077;
    L_0x0060:
        r14 = r5.contains(r10);	 Catch:{ Exception -> 0x01cf }
        if (r14 != 0) goto L_0x0077;
    L_0x0066:
        r14 = r5.contains(r8);	 Catch:{ Exception -> 0x01cf }
        if (r14 != 0) goto L_0x0077;
    L_0x006c:
        r6 = r6.d();	 Catch:{ Exception -> 0x01cf }
        r6 = r6.m;	 Catch:{ Exception -> 0x01cf }
        r6.a(r7);	 Catch:{ Exception -> 0x01cf }
    L_0x0075:
        r6 = 0;
        goto L_0x0099;
    L_0x0077:
        r14 = "https://google.com/search?";
        r15 = r5.length();	 Catch:{ Exception -> 0x01cf }
        if (r15 == 0) goto L_0x0084;
    L_0x007f:
        r14 = r14.concat(r5);	 Catch:{ Exception -> 0x01cf }
        goto L_0x008a;
    L_0x0084:
        r15 = new java.lang.String;	 Catch:{ Exception -> 0x01cf }
        r15.<init>(r14);	 Catch:{ Exception -> 0x01cf }
        r14 = r15;
    L_0x008a:
        r14 = android.net.Uri.parse(r14);	 Catch:{ Exception -> 0x01cf }
        r6 = r6.x(r14);	 Catch:{ Exception -> 0x01cf }
        if (r6 == 0) goto L_0x0099;
    L_0x0094:
        r14 = "referrer";
        r6.putString(r9, r14);	 Catch:{ Exception -> 0x01cf }
    L_0x0099:
        r14 = 1;
        r15 = "_cmp";
        r16 = 0;
        if (r0 == 0) goto L_0x00fb;
    L_0x00a0:
        r0 = r2.a;	 Catch:{ Exception -> 0x01cf }
        r0 = r0.k();	 Catch:{ Exception -> 0x01cf }
        r0 = r0.x(r3);	 Catch:{ Exception -> 0x01cf }
        if (r0 == 0) goto L_0x00fc;
    L_0x00ac:
        r3 = "intent";
        r0.putString(r9, r3);	 Catch:{ Exception -> 0x01cf }
        r3 = r2.a;	 Catch:{ Exception -> 0x01cf }
        r3 = r3.a;	 Catch:{ Exception -> 0x01cf }
        r3 = r3.g;	 Catch:{ Exception -> 0x01cf }
        r9 = c.e.a.b.f.b.p.e0;	 Catch:{ Exception -> 0x01cf }
        r3 = r3.o(r9);	 Catch:{ Exception -> 0x01cf }
        if (r3 == 0) goto L_0x00e0;
    L_0x00bf:
        r3 = r0.containsKey(r12);	 Catch:{ Exception -> 0x01cf }
        if (r3 != 0) goto L_0x00e0;
    L_0x00c5:
        if (r6 == 0) goto L_0x00e0;
    L_0x00c7:
        r3 = r6.containsKey(r12);	 Catch:{ Exception -> 0x01cf }
        if (r3 == 0) goto L_0x00e0;
    L_0x00cd:
        r3 = "_cer";
        r9 = "gclid=%s";
        r13 = new java.lang.Object[r14];	 Catch:{ Exception -> 0x01cf }
        r17 = r6.getString(r12);	 Catch:{ Exception -> 0x01cf }
        r13[r16] = r17;	 Catch:{ Exception -> 0x01cf }
        r9 = java.lang.String.format(r9, r13);	 Catch:{ Exception -> 0x01cf }
        r0.putString(r3, r9);	 Catch:{ Exception -> 0x01cf }
    L_0x00e0:
        r3 = r2.a;	 Catch:{ Exception -> 0x01cf }
        r3.H(r4, r15, r0);	 Catch:{ Exception -> 0x01cf }
        r3 = r2.a;	 Catch:{ Exception -> 0x01cf }
        r3 = r3.a;	 Catch:{ Exception -> 0x01cf }
        r3 = r3.g;	 Catch:{ Exception -> 0x01cf }
        r9 = c.e.a.b.f.b.p.D0;	 Catch:{ Exception -> 0x01cf }
        r3 = r3.o(r9);	 Catch:{ Exception -> 0x01cf }
        if (r3 == 0) goto L_0x00fc;
    L_0x00f3:
        r3 = r2.a;	 Catch:{ Exception -> 0x01cf }
        r3 = r3.n;	 Catch:{ Exception -> 0x01cf }
        r3.a(r4, r0);	 Catch:{ Exception -> 0x01cf }
        goto L_0x00fc;
    L_0x00fb:
        r0 = 0;
    L_0x00fc:
        r3 = r2.a;	 Catch:{ Exception -> 0x01cf }
        r3 = r3.a;	 Catch:{ Exception -> 0x01cf }
        r3 = r3.g;	 Catch:{ Exception -> 0x01cf }
        r9 = c.e.a.b.f.b.p.g0;	 Catch:{ Exception -> 0x01cf }
        r3 = r3.o(r9);	 Catch:{ Exception -> 0x01cf }
        r9 = "auto";
        if (r3 == 0) goto L_0x0135;
    L_0x010c:
        r3 = r2.a;	 Catch:{ Exception -> 0x01cf }
        r3 = r3.a;	 Catch:{ Exception -> 0x01cf }
        r3 = r3.g;	 Catch:{ Exception -> 0x01cf }
        r13 = c.e.a.b.f.b.p.f0;	 Catch:{ Exception -> 0x01cf }
        r3 = r3.o(r13);	 Catch:{ Exception -> 0x01cf }
        if (r3 != 0) goto L_0x0135;
    L_0x011a:
        if (r6 == 0) goto L_0x0135;
    L_0x011c:
        r3 = r6.containsKey(r12);	 Catch:{ Exception -> 0x01cf }
        if (r3 == 0) goto L_0x0135;
    L_0x0122:
        if (r0 == 0) goto L_0x012a;
    L_0x0124:
        r0 = r0.containsKey(r12);	 Catch:{ Exception -> 0x01cf }
        if (r0 != 0) goto L_0x0135;
    L_0x012a:
        r0 = r2.a;	 Catch:{ Exception -> 0x01cf }
        r3 = "_lgclid";
        r13 = r6.getString(r12);	 Catch:{ Exception -> 0x01cf }
        r0.J(r9, r3, r13);	 Catch:{ Exception -> 0x01cf }
    L_0x0135:
        r0 = android.text.TextUtils.isEmpty(r5);	 Catch:{ Exception -> 0x01cf }
        if (r0 == 0) goto L_0x013d;
    L_0x013b:
        goto L_0x01dd;
    L_0x013d:
        r0 = r2.a;	 Catch:{ Exception -> 0x01cf }
        r0 = r0.d();	 Catch:{ Exception -> 0x01cf }
        r0 = r0.m;	 Catch:{ Exception -> 0x01cf }
        r3 = "Activity created with referrer";
        r0.b(r3, r5);	 Catch:{ Exception -> 0x01cf }
        r0 = r2.a;	 Catch:{ Exception -> 0x01cf }
        r0 = r0.a;	 Catch:{ Exception -> 0x01cf }
        r0 = r0.g;	 Catch:{ Exception -> 0x01cf }
        r3 = c.e.a.b.f.b.p.f0;	 Catch:{ Exception -> 0x01cf }
        r0 = r0.o(r3);	 Catch:{ Exception -> 0x01cf }
        r3 = "_ldl";
        if (r0 == 0) goto L_0x018b;
    L_0x015a:
        if (r6 == 0) goto L_0x0177;
    L_0x015c:
        r0 = r2.a;	 Catch:{ Exception -> 0x01cf }
        r0.H(r4, r15, r6);	 Catch:{ Exception -> 0x01cf }
        r0 = r2.a;	 Catch:{ Exception -> 0x01cf }
        r0 = r0.a;	 Catch:{ Exception -> 0x01cf }
        r0 = r0.g;	 Catch:{ Exception -> 0x01cf }
        r5 = c.e.a.b.f.b.p.D0;	 Catch:{ Exception -> 0x01cf }
        r0 = r0.o(r5);	 Catch:{ Exception -> 0x01cf }
        if (r0 == 0) goto L_0x0184;
    L_0x016f:
        r0 = r2.a;	 Catch:{ Exception -> 0x01cf }
        r0 = r0.n;	 Catch:{ Exception -> 0x01cf }
        r0.a(r4, r6);	 Catch:{ Exception -> 0x01cf }
        goto L_0x0184;
    L_0x0177:
        r0 = r2.a;	 Catch:{ Exception -> 0x01cf }
        r0 = r0.d();	 Catch:{ Exception -> 0x01cf }
        r0 = r0.m;	 Catch:{ Exception -> 0x01cf }
        r4 = "Referrer does not contain valid parameters";
        r0.b(r4, r5);	 Catch:{ Exception -> 0x01cf }
    L_0x0184:
        r0 = r2.a;	 Catch:{ Exception -> 0x01cf }
        r4 = 0;
        r0.J(r9, r3, r4);	 Catch:{ Exception -> 0x01cf }
        goto L_0x01dd;
    L_0x018b:
        r0 = r5.contains(r12);	 Catch:{ Exception -> 0x01cf }
        if (r0 == 0) goto L_0x01b4;
    L_0x0191:
        r0 = r5.contains(r11);	 Catch:{ Exception -> 0x01cf }
        if (r0 != 0) goto L_0x01b5;
    L_0x0197:
        r0 = r5.contains(r10);	 Catch:{ Exception -> 0x01cf }
        if (r0 != 0) goto L_0x01b5;
    L_0x019d:
        r0 = r5.contains(r8);	 Catch:{ Exception -> 0x01cf }
        if (r0 != 0) goto L_0x01b5;
    L_0x01a3:
        r0 = "utm_term";
        r0 = r5.contains(r0);	 Catch:{ Exception -> 0x01cf }
        if (r0 != 0) goto L_0x01b5;
    L_0x01ab:
        r0 = "utm_content";
        r0 = r5.contains(r0);	 Catch:{ Exception -> 0x01cf }
        if (r0 == 0) goto L_0x01b4;
    L_0x01b3:
        goto L_0x01b5;
    L_0x01b4:
        r14 = 0;
    L_0x01b5:
        if (r14 != 0) goto L_0x01c3;
    L_0x01b7:
        r0 = r2.a;	 Catch:{ Exception -> 0x01cf }
        r0 = r0.d();	 Catch:{ Exception -> 0x01cf }
        r0 = r0.m;	 Catch:{ Exception -> 0x01cf }
        r0.a(r7);	 Catch:{ Exception -> 0x01cf }
        goto L_0x01dd;
    L_0x01c3:
        r0 = android.text.TextUtils.isEmpty(r5);	 Catch:{ Exception -> 0x01cf }
        if (r0 != 0) goto L_0x01dd;
    L_0x01c9:
        r0 = r2.a;	 Catch:{ Exception -> 0x01cf }
        r0.J(r9, r3, r5);	 Catch:{ Exception -> 0x01cf }
        goto L_0x01dd;
    L_0x01cf:
        r0 = move-exception;
        r2 = r2.a;
        r2 = r2.d();
        r2 = r2.f;
        r3 = "Throwable caught in handleReferrerForOnActivityCreated";
        r2.b(r3, r0);
    L_0x01dd:
        return;
        */
        throw new UnsupportedOperationException("Method not decompiled: c.e.a.b.f.b.c7.run():void");
    }
}
